package com.dollar.ruyuan_juc.actualProject.smartAlarmSystem;

import java.util.Random;
import java.util.concurrent.TimeUnit;

public class TestAlarmAgent {
    public static void main(String[] args) throws InterruptedException {
        Random random = new Random();
        AlarmAgent alarmAgent = new AlarmAgent();
        alarmAgent.init();
        while (true) {
            TimeUnit.MILLISECONDS.sleep(300);
            alarmAgent.sendAlarm(new AlarmInfo(random.nextInt(10000) + ""));
        }
    }
}
